package com.zkzx.common.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.core.annotation.Order;

import javax.validation.constraints.Min;

/**
 * @author young Email:yanghui@zkraising.com
 * @description
 * @company 北京中科智兴物联科技有限公司 @版权所有
 * @since 2021年04月29日 09时40分
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "RequestFilterParams", description = "分页查询条件")
public class RequestFilterParams {

    @ApiParam(value = "页码", defaultValue = "1")
    @ApiModelProperty(value = "页码", example = "1")
    @Min(1L)
    private Integer page;

    @ApiParam( value = "每页数量", name = "per_page", defaultValue = "10")
    @ApiModelProperty(value = "每页数量",name = "per_page", example = "10")
    private Integer perPage;

    @ApiParam(value = "排序字段", name = "field", defaultValue = "createTime")
    @ApiModelProperty(value = "排序字段",name = "field", example = "createTime",dataType = "createTime")
    private String field = "createTime";

    @ApiParam(value = "排序类型", name = "order", defaultValue = "DESC", allowableValues = "ASC, DESC")
    @ApiModelProperty(value = "排序类型",name = "order", example = "ASC, DESC")
    @Order
    private String order;
}
